package com.niguang.work.api.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.TableLogic;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author 12380
 * @since 2018-10-21
 */
@TableName("monitor_device")
@Data
public class MonitorDevice extends Model<MonitorDevice> {

    private static final long serialVersionUID = 1L;

    private Long id;
    /**
     * 工地id
     */
    @TableField("site_id")
    private Long siteId;
    /**
     * 设备id
     */
    @TableField("device_id")
    private String deviceId;
    /**
     * 设备描述
     */
    @TableField("device_desc")
    private String deviceDesc;
    /**
     * Ai事件状态:0关,1开
     */
    @TableField("ai_event_status")
    private Integer aiEventStatus;
    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 创建时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    /**
     * 未删除-0  已删除-1
     */
    @TableField("del_flag")
    @TableLogic
    private Integer delFlag;

    @TableField(exist = false)
    private String siteName;

    public static final String ID = "id";

    public static final String SITE_ID = "site_id";

    public static final String DEVICE_ID = "device_id";

    public static final String DEVICE_DESC = "device_desc";

    public static final String AI_EVENT_STATUS = "ai_event_status";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String DEL_FLAG = "del_flag";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "MonitorDevice{" +
                "id=" + id +
                ", siteId=" + siteId +
                ", deviceId=" + deviceId +
                ", deviceDesc=" + deviceDesc +
                ", aiEventStatus=" + aiEventStatus +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", delFlag=" + delFlag +
                "}";
    }
}
